package com.springboot.dto;

public class DoctorChat {
    private String selfName;
    private String otherName;
    private String otherLogoLink;
    public String messageTime;
    private String isRight;
    private String messageContent;
    private String isPicture;
    private String photoLink;

    public DoctorChat(){
    }

    public DoctorChat(String selfName, String otherName, String otherLogoLink, String messageTime,
                      String isRight, String messageContent, String isPicture, String photoLink)
    {
        this.selfName=selfName;
        this.otherName=otherName;
        this.otherLogoLink=otherLogoLink;
        this.messageTime=messageTime;
        this.isRight=isRight;
        this.messageContent=messageContent;
        this.isPicture=isPicture;
        this.photoLink=photoLink;
    }

    public String getSelfName() {
        return selfName;
    }

    public void setSelfName(String selfName) {
        this.selfName = selfName;
    }

    public String getOtherName() {
        return otherName;
    }

    public void setOtherName(String otherName) {
        this.otherName = otherName;
    }

    public String getOtherLogoLink() {
        return otherLogoLink;
    }

    public void setOtherLogoLink(String otherLogoLink) {
        this.otherLogoLink = otherLogoLink;
    }

    public String getMessageContent() {
        return messageContent;
    }

    public void setMessageContent(String messageContent) {
        this.messageContent = messageContent;
    }

    public String getIsRight() {
        return isRight;
    }

    public void setIsRight(String isRight) {
        this.isRight = isRight;
    }

    public String getMessageTime() {
        return messageTime;
    }

    public void setMessageTime(String messageTime) {
        this.messageTime = messageTime;
    }

    public String getIsPicture() {
        return isPicture;
    }

    public void setIsPicture(String isPicture) {
        this.isPicture = isPicture;
    }

    public String getPhotoLink() {
        return photoLink;
    }

    public void setPhotoLink(String photoLink) {
        this.photoLink = photoLink;
    }

    //封装Json字符串
    @Override
    public String toString() {
        if(otherLogoLink!=null)
        {
            otherLogoLink = otherLogoLink.replaceAll("", "");
        }
        if(photoLink!=null)
        {
            photoLink = photoLink.replaceAll("", "");
        }
        return "{" +
                "\"selfName\":\"" + selfName + '\"' +
                ", \"otherName\":\"" + otherName + '\"' +
                ", \"otherImg\":\"" + otherLogoLink + '\"' +
                ", \"time\":\"" + messageTime + '\"' +
                ", \"content\":\"" + messageContent + '\"' +
                ", \"isRight\":\""+ isRight + '\"' +
                ", \"isImg\":\""+ isPicture + '\"' +
                ", \"photoLink\":\""+ photoLink + '\"' +
                '}';
    }
}
